#ifndef _PIPE_POSITION_MODEL_H
#define _PIPE_POSITION_MODEL_H

#ifndef PIPE_LENGTH
#define PIPE_LENGTH	(15)
#endif

#ifndef PIPE_WIDTH
#define PIPE_WIDTH	(0.4)
#endif

#ifndef PIPE_VELOCITY
#define PIPE_VELOCITY	(2)
#endif

#include "mtxlib.h"

/**					emergePoint
*					   |
*	pipe like that      ========= pipeLength, cross section is in y,z coordinate
*					   000
*					    0
*	
*						_____
*					   |  .  | --> cross section width
*					   |_____| --> emergePoint in the center
*
*/

class PipePositionModel{
private:
	static PipePositionModel* ppm;
	
	PipePositionModel(vector3 emergePoint = vector3(0, 0, 0),
		float pipeLength = PIPE_LENGTH,
		float width = PIPE_WIDTH){
			this->emergePoint.x = emergePoint.x;
			this->emergePoint.y = emergePoint.y;
			this->emergePoint.z = emergePoint.z;

			this->pipeLength = pipeLength;

			this->width = width;

			this->velocity = PIPE_VELOCITY;
	}

public:
	vector3 emergePoint;
	float pipeLength;
	float width;
	float velocity;

	static PipePositionModel* initInstance(
		vector3 emergePoint = vector3(0, 0, 0),
		float pipeLength = PIPE_LENGTH,
		float width = PIPE_WIDTH);

	static PipePositionModel* getInstance();

	vector3 getPosition();

	vector3 getVelocity();
};

#endif